Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing XML-based subreports if the underlying file does not exist

Status
Not open for further replies.

onedunpark

IS-IT--Management
Jan 17, 2003
19
GB
Hi,

Using CR.NET (version included with VB.NET 2003 Pro Edition)

I have (owing to my inability to access my legacy database directly), created a number of XML data files for each element (page) of my report.

I have on-demand subreports defined based on each of these data files. The subreports are located in different details sections and are all correctly linked by a common field back to the main report.

If, however, one of the data files is not created due to there being no data, I need a way to suppress the subreport.

I can see how a subreport can be suppressed manually in the designer but can't see from the formula expert how I do this at runtime, dependant on the existence of the underlying datafile (or not).

Any and all replies appreciated

Steven
 
you could suppress the entire section when the subreport does not return any value

simply choose suppress blank section for every subreport



Mo
 
Hi,

Have tried that in the Sections Expert, but the hyperlink for the sub-report is still displayed (these are on-demand subreports) and on clicking the hyperlink I am presented with a logon prompt to choose a datasource.

I have my main report in the first Details section and all other sub-reports defined in seperate details sections.

I either need the hyperlink to NOT display (preferable) or on clicking, some way of checking for the existence of the underlying file and presenting something to the user (a pre-defined message/whatever) to let them now there is no data to be displayed

Thanks for the response

Steven
 
Use my File UFL and see if the file exists. Then suppress the section with the subreport if that formula says there is no file.

A subreport won't process if it is in a suppress section.

Editor and Publisher of Crystal Clear
 
chelseatech,

Thanks for the post. This app will be deployed to 50 users in our organisation. I'd be grateful if you could let me know how this will affect the licencing of the dll. I'm assuming we'd have to distribute it with the app and register locally on all machines that will run the app.

Steven

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top