nameless defaultsources

0
luna posted this 22 April 2015

Hi,
We work with your tool for a while and it works very well!
Now we want to make the way of documentgeneration more generic. We have multiple defaultsources depending on the reporttopics. The way we get the defaultsource of the template now is a little bit error-prone.
We think it would be nice if we could read the defaultsourcename from the template like the additionalsourcenames.
Is there a possibility that you add this feature in the future?

Best regards, Cornelia Inauen

8 Posts
8 Points
7 Comments
Order By: Standard | Newest | Votes
0
jles posted this 23 April 2015

Hi Cornelia,

If I understand you correctly, you would like to use only named data sources, without the default one. Am I correct? Or is it just about the retrieval through the TemplateMetadata.DataSource API?

Thanks, Jure Leskovec

119 Posts
246 Points
0
luna posted this 23 April 2015

Hi Jure,
Now the documentation says
"Each report must have at least one date source defined, with no name to be provided ...". If there were the possibility (maybe optional) to give a defaultdatasource a name it would be much easier to handle templates with different defaultdatasources the generic way. Its just about the retrieval through the TemplateMetadata.DataSource API. It would be nice, if one can ask "give me all used datasources" not only the additional ones.

Cornelia

8 Posts
8 Points
0
jles posted this 23 April 2015

Hi Cornelia,

You should know that TemplateMetadata.DataSources API returns all the data sources defined on a template (the default + all the named ones). When you itterate through the data sources, you can check the DataSource.IsDefault in order to find out if the data source is the default one. Let me know if this kind of and API is what you are looking for.

Regards, Jure

119 Posts
246 Points
0
luna posted this 24 April 2015

Hi Jure,
This is the way we do it. No problem if one have only one defaultsource - but our user can choose from different defaultsources depending on the topic.
Now when we iterate through the datasources we find all sources, we know there ist a defaultsource, the DataSource.IsDefault = true but the name property = null - so we have to gess the name.

Cornelia

Last edited 24 April 2015

8 Posts
8 Points
0
jles posted this 24 April 2015

Cornelia,

So your question is actually about "how to get rid of the default data source" on the conceptual level. Well, you won't be able to get rid of it, but we might change the rule in the future so that you will be able to give names to the default data sources as well. Might this be a good solution for you?

-- Jure

119 Posts
246 Points
0
luna posted this 28 April 2015

Hi Jure
Yes, this would be very helpful.
Thanks for your reply.

Cornelia

8 Posts
8 Points
0
jles posted this 28 April 2015

Cornelia,

This feature has been added to our TODO list.

Best regards, Jure Leskovec

119 Posts
246 Points

Our 30761 members have posted 271 times in 80 discussions