on 2008 Oct 21 9:27 PM
All,
Apparently, within a CR function or formula, most, if not all, of a report field's properties are inaccessible. We have a requirement to allow users to toggle columns off/on. As columns are toggled off, I'd like to move the columns on the right leftward by the width of the suppressed column. I can do this if I create a list containing field name/width pairs which I use at run time to calculate the X offset, if any, for each report field. What I'd really like to do is "inspect" the width property of each (relevant) field.
I assume from looking at the RAS SDK that one can inspect a field using the getWidth method. What's not clear to me is if I can develop a class to do this and then reference it (server side) from a CR report function at runtime. We could do this from the Java application that requests the report, but that seem less than desirable.
Thanks,
pf
I like your thinking Paul, unfortunately what you are describing isn't really doable. You would indeed need to use the RAS SDK to perform the tasks you are describing, and this would need to be done from a Java or J2EE application at runtime. You can do this without viewing the report in a browser, and instead export the report to Crystal Reports format or Save the report so that you can retain it in it's changed format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. I hope I can followup.
To my primary question,
1) we cannot create a repository based custom function using the SDK, correct?
2) Can we create a custom function using the SDK and "embed" it any report that requires it? I've yet not had time to spend interpreting the docs or experimenting with the SDK regarding this question.
3) If I've understood what I read so far, one can create a custom function using the SDK. Is this correct?
Your suggestion: report to Crystal Reports format -> If I understand correctly, you're suggesting that we save the various "permutations" of column combinations in separate reports? This may not work for our situation. I've written some functions and formulas that can "hide and move" columns but they need "initial conditions"namely the x coordinate of each column. I think it's too much to askas well as error proneof the report designer to collect and embed this information in a formula before she saves the report.
Any further suggestions are welcomed...we are new to CR.
regards,
pf
I will answer your questions first and then explain my answers:
1) You can create a repository function using the SDK but it won't work like you think it will.....
2) Same answer as above....
3) You can create custom UFL's with an SDK call the Java UFL SDK.
To explain. You would like to see columns being moved based on selections from the user. The RAS SDK is a report modification SDK that modifies the report source in memory and then either displays it in an html viewer or export's or saves the report. If you tried to do this in Crystal Reports with a repository function, RAS would do what it was supposed to do but you wouldn't see the changes unless you saved, closed and re-opened the report.
For your needs, to get the functionality you are looking for, the best bet would be to develop a web application using the RAS SDK; this would allow you to manipulate the report source based on parameters given by the user, and then each user would see what you intended when the viewer finished rendering the report. This would enable you to use the same report over and over again and just manipulate it in memory using the SDK.
User | Count |
---|---|
77 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.